#include <OsgClassDataSource/SceneViewerOsg.h>
#include <iostream>
#include <osg/Group>
#include <NodeInfoContainer.h>
#include <SceneViewer.h>
#include <SceneViewerFunctions.h>
#include <ObjectInspectorVisitor.h>
SceneViewerOsg::SceneViewerOsg( QObject *parent /*= 0*/ ) : GroupOsg(parent)
{
    m_object = SceneViewer::instance();
    setShowInClassList(false);
//    osg::Node* nodePtr = dynamic_cast<osg::Node*>(m_object.get());
//    nodePtr->setNodeMask(0x1);
    this->refreshInfoContainer();
}


SceneViewerOsg::~SceneViewerOsg()
{

}

QVarintTrigger SceneViewerOsg::getTriggerCameraFitScene()
{
    return QVarintTrigger();
}

void SceneViewerOsg::setTriggerCameraFitScene(QVarintTrigger trigger)
{
    //std::cout<<"SceneViewerOsg::setTrigger triggered"<<std::endl;
    SceneViewerFunctions::cameraFitScene();

    //test code for ObjectInspectorVisitor, this can be delete.
//    ObjectInspectorVisitor visitor;
//    visitor.traverse(this->getObjItem());
}



